package com.springboot.springboot_demo.controller;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.springboot.springboot_demo.model.MNewseeDeliveryPlanOwnerS;
import com.uama.utils.CollectorUtil;
import com.uama.utils.log.LogUtils;

/**
 * Title: CollectorController.class <br>
 * Description: <br>
 * Create DateTime:2022/7/4 18:36 <br>
 *
 * @author peichang.yang
 */
public class CollectorController {

    public static void main(String[] args) {
        List<MNewseeDeliveryPlanOwnerS> param = new ArrayList<>();
        MNewseeDeliveryPlanOwnerS s = new MNewseeDeliveryPlanOwnerS();
        s.setPlanId(11L);
        param.add(s);

        MNewseeDeliveryPlanOwnerS s1 = new MNewseeDeliveryPlanOwnerS();
        s1.setPlanId(23L);
        param.add(s1);

        MNewseeDeliveryPlanOwnerS s2 = new MNewseeDeliveryPlanOwnerS();
        s1.setPlanId(24L);
        param.add(s2);

        MNewseeDeliveryPlanOwnerS s3 = new MNewseeDeliveryPlanOwnerS();
        s3.setPlanId(28L);
        param.add(s3);
        for(List<MNewseeDeliveryPlanOwnerS> mNewseeDeliveryPlanOwnerSList: CollectorUtil.subList(param,3)){
            mNewseeDeliveryPlanOwnerSList.stream().forEach(l-> l.setMessageSize(param.size()));
            System.out.printf("");
        }
        System.out.printf("" + param.size());
    }
}
